<?php

/**
 * MfgPno form.
 *
 * @package    tinystockmis
 * @subpackage form
 * @author     Linfeng Wu
 * @version    SVN: $Id: sfDoctrineFormTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class MfgPnoForm extends BaseMfgPnoForm {
    
    public function configure() {
        unset(
                $this["id"],
                $this['created_at'],
                $this["updated_at"]
            );

        $this->widgetSchema["acct_set_id"] = new sfWidgetFormInputHidden(
                array(),
                array("value" => sfContext::getInstance()->getUser()->getAttribute("acct_set"))
                );

        $this->widgetSchema["pno_opr"] = new sfWidgetFormInputHidden(
                array(),
                array("value"=>sfContext::getInstance()->getUser()->getAttribute("user_id"))
                );

        $this->widgetSchema["pno_abc"] = new sfWidgetFormChoice(
                array('choices' => MfgPno::$pnoAbc )
                );

        $this->widgetSchema["pno_src"] = new sfWidgetFormChoice(
                array('choices' => MfgPno::$pnoSrc)
                );

        $this->widgetSchema["pno_status"] = new sfWidgetFormChoice(
                array('choices' => MfgPno::$pnoStatus)
                );

        $this->widgetSchema["pno_pp"] = new sfWidgetFormChoice(
                array('choices' => MfgPno::$pnoPp)
                );



        $this->widgetSchema->setLabels( array(
                    "pno_no" => "物料编号",
                    'pno_name'    => "物料名称",
                    'pno_desc'    => "规格",
                    'pno_fdesc'   => "详细规格",
                    'pno_uq'      => "计量单位" ,
                    'pno_minorq'  => "最小定购量" ,
                    'pno_maxorq'  => "最大定购量" ,
                    'pno_orq'     => "固定定购量" ,
                    'pno_src'     => "来源别",
                    'pno_abc'     => "ABC分类",
                    'pno_sfq'     => "安全存量" ,
                    'pno_rop'     => "再订购点" ,
                    'pno_eoq'     => "经济定购量" ,
                    'pno_pp'      => "订购政策",
                    'pno_bom'     => "BOM" ,
                    'pno_status'  => "状态",
                    )
                );

        
    }
}
